j = Job(name='First ganga job')#后台任务名称
myApp = GaudiExec()
myApp.directory = "./DaVinciDev_v45r8"#达芬奇版本
j.application = myApp
j.application.options = ['ntuple-options.py']#配置文件
j.application.platform = 'x86_64-centos7-gcc8-opt'#配置平台
bkPath = '/MC/2016/Beam6500GeV-2016-MagDown-Nu1.6-25ns-Pythia8/Sim09c/Trig0x6138160F/Reco16/Turbo03/Stripping28r1NoPrescalingFlagged/27163002/ALLSTREAMS.DST'
#数据路径(直接从grid上读取文件DSTDST)
data  = BKQuery(bkPath, dqflag=['OK']).getDataset()
j.inputdata = data[0:2]#输入样本前两个
j.backend = Dirac()
j.splitter = SplitByFiles(filesPerJob=1)
j.outputfiles = [LocalFile('DVntuple.root')]#输出文件
j.submit()#提交工作
